<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04_文字溢出替换为省略号</title>
    <style>
        div{
            width: 200px;
            background-color: lightgrey;
            white-space: nowrap;/*强制不换行*/
            overflow: hidden;/*溢出隐藏*/
            text-overflow: ellipsis;/*有溢出的文字显示省略号*/
        }
    </style>
</head>
<body>
    <div title="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusa">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus asperiores, atque blanditiis ea fugit illum voluptates. Ab ad consectetur error in ipsam modi molestias nam officiis, quis reiciendis! Ipsum, magnam!
    </div>
</body>
</html>